import requests


headers = {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "referer": "https://www.zhipin.com/web/geek/job?query=python%E7%88%AC%E8%99%AB&city=101200100&position=100109&page=2",
    "sec-ch-ua": "\"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not_A Brand\";v=\"24\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "traceid": "F-52a4f2dxvIG2DATB",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "x-requested-with": "XMLHttpRequest"
}
cookies = {
    "lastCity": "101180100",
    "__zp_seo_uuid__": "de5d20d7-ab6d-4d2e-9223-b83fb69050a7",
    "__l": "r=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3D8rdFpU52ZR27fiBpFGWr7_i0MI_ePnUG0NlteZtBaEe64RC7LLMLtyH_bGqFDXgG%26wd%3D%26eqid%3Dc15b0564000a097200000003673d42fa&l=%2F&s=1",
    "__g": "-",
    "Hm_lvt_194df3105ad7148dcf2b98a91b5e727a": "1732068098",
    "HMACCOUNT": "AFD53293F7A60F46",
    "ab_guid": "d0c2b0aa-a4cb-44b0-9104-29c4a04afa49",
    "Hm_lpvt_194df3105ad7148dcf2b98a91b5e727a": "1732068144",
    "__zp_stoken__": "61effQDvDpMOEw4PCv0YuFw4SChA7Kzs7LQtDQC9FR0dAOz9JSUA7Ryc7MDrCvsOBfnxpw4wnQC07PzxAQEk%2FR0UdO0PFhcK7QTo4w6nDgMOGfXtdw4sPUhDDtcK7D8SJwrwYGMOADDjDhy0uDcK%2BRDtDQBTDiMK7w4Iww4DDhMOCw6jCusKBwrs7O3TCv8OBwrszPAwLFRQ8PFNKXg5KX0toaFYSUlJZKkREQTtJwpU2PgwQGA8PCw8XEBAZFQ0LCwsPFxAQCg4WEREzP8KcwrvDhcSBwotXw6zEocKhw4PDq1PDq8K%2BxIhgwrN5wr7CtMSEwrjCr8KuwqTCr8KeasKqwoXCn8KqXFrCtcOEwrLDiXJbwrPDg8KzTE%2FCg8KDS2V9eXAVYmkZEz8YTcOWw4o%3D",
    "__c": "1732068098",
    "__a": "93400528.1732068098..1732068098.6.1.6.6"
}
url = "https://www.zhipin.com/wapi/zpgeek/businessDistrict.json"
params = {
    "cityCode": "101200100"
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)
res = response.json()
print(response.json())
city_id = res['zpData']['businessDistrict']['code']
city_name = res['zpData']['businessDistrict']['name']
region_list = res['zpData']['businessDistrict']['subLevelModelList']
for region in region_list:
    region_id = region['code']
    region_name = region['name']
    street_list = region['subLevelModelList']
    for street in street_list:
        street_id = street['code']
        street_name = street['name']
